home *** CD-ROM | disk | FTP | other *** search
- static const char *spc_names[] = {
- "activetofront",
- "appicon",
- "appiconclickaction",
- "appicondropaction",
- "appiconname",
- "appicontitle",
- "ascii",
- "autoindent",
- "autosplit",
- "autounblock",
- "bbpen",
- "bgpen",
- "block",
- "cmdshell",
- "cmdshellname",
- "cmdshellprompt",
- "colno",
- "comlinemode",
- "currentdir",
- "currentline",
- "currentword",
- "debug",
- "dobackup",
- "ed",
- "errorsoncmdshell",
- "fgpen",
- "filename",
- "findstr",
- "firstnb",
- "fname",
- "followcursor",
- "globalsearch",
- "gtbformat",
- "hgpen",
- "icon",
- "iconactive",
- "iconmode",
- "icontitle",
- "ignorecase",
- "infixmode",
- "insertmode",
- "itemcheck",
- "keytable",
- "lineno",
- "margin",
- "menufontname",
- "menufontsize",
- "menustrip",
- "modified",
- "nicepaging",
- "norequest",
- "numlines",
- "parcol",
- "pens",
- "pos",
- "prevnbline",
- "recentword",
- "repstr",
- "reqpattern",
- "reqresult",
- "restofline",
- "rexxport",
- "rxresult",
- "saveicons",
- "savetabs",
- "scanf",
- "shortlines",
- "showtitle",
- "simpletabs",
- "sourcebreaks",
- "tabstop",
- "tbpen",
- "tfpen",
- "title",
- "txtfontname",
- "txtfontsize",
- "version",
- "viewmode",
- "warningsoncmdshell",
- "window",
- "windowcycling",
- "windowtitles",
- "wordwrap",
- #define _I_activetofront_ 0
- #define _I_appicon_ 1
- #define _I_appiconclickaction_ 2
- #define _I_appicondropaction_ 3
- #define _I_appiconname_ 4
- #define _I_appicontitle_ 5
- #define _I_ascii_ 6
- #define _I_autoindent_ 7
- #define _I_autosplit_ 8
- #define _I_autounblock_ 9
- #define _I_bbpen_ 10
- #define _I_bgpen_ 11
- #define _I_block_ 12
- #define _I_cmdshell_ 13
- #define _I_cmdshellname_ 14
- #define _I_cmdshellprompt_ 15
- #define _I_colno_ 16
- #define _I_comlinemode_ 17
- #define _I_currentdir_ 18
- #define _I_currentline_ 19
- #define _I_currentword_ 20
- #define _I_debug_ 21
- #define _I_dobackup_ 22
- #define _I_ed_ 23
- #define _I_errorsoncmdshell_ 24
- #define _I_fgpen_ 25
- #define _I_filename_ 26
- #define _I_findstr_ 27
- #define _I_firstnb_ 28
- #define _I_fname_ 29
- #define _I_followcursor_ 30
- #define _I_globalsearch_ 31
- #define _I_gtbformat_ 32
- #define _I_hgpen_ 33
- #define _I_icon_ 34
- #define _I_iconactive_ 35
- #define _I_iconmode_ 36
- #define _I_icontitle_ 37
- #define _I_ignorecase_ 38
- #define _I_infixmode_ 39
- #define _I_insertmode_ 40
- #define _I_itemcheck_ 41
- #define _I_keytable_ 42
- #define _I_lineno_ 43
- #define _I_margin_ 44
- #define _I_menufontname_ 45
- #define _I_menufontsize_ 46
- #define _I_menustrip_ 47
- #define _I_modified_ 48
- #define _I_nicepaging_ 49
- #define _I_norequest_ 50
- #define _I_numlines_ 51
- #define _I_parcol_ 52
- #define _I_pens_ 53
- #define _I_pos_ 54
- #define _I_prevnbline_ 55
- #define _I_recentword_ 56
- #define _I_repstr_ 57
- #define _I_reqpattern_ 58
- #define _I_reqresult_ 59
- #define _I_restofline_ 60
- #define _I_rexxport_ 61
- #define _I_rxresult_ 62
- #define _I_saveicons_ 63
- #define _I_savetabs_ 64
- #define _I_scanf_ 65
- #define _I_shortlines_ 66
- #define _I_showtitle_ 67
- #define _I_simpletabs_ 68
- #define _I_sourcebreaks_ 69
- #define _I_tabstop_ 70
- #define _I_tbpen_ 71
- #define _I_tfpen_ 72
- #define _I_title_ 73
- #define _I_txtfontname_ 74
- #define _I_txtfontsize_ 75
- #define _I_version_ 76
- #define _I_viewmode_ 77
- #define _I_warningsoncmdshell_ 78
- #define _I_window_ 79
- #define _I_windowcycling_ 80
- #define _I_windowtitles_ 81
- #define _I_wordwrap_ 82
- };
-
- #define spc_num_vars (sizeof(spc_names)/sizeof(spc_names[0]))
-
- static char *spc_get(long lock) {
- long array[6];
- char *value = NULL;
- char *av0_bak = av[0];
- char *av1_bak = av[1];
- char *av2_bak = av[2];
- switch (lock) {
- case _I_activetofront_:
- value = GETF_ACTIVATETOFRONT (Ep)? "1": "0";
- ;;break;
- case _I_appicon_:
- value = GETF_APIC_ACTIVE (Ep)? "1": "0";
- ;;break;
- case _I_appiconclickaction_:
- value = APIC_ActionDblClick;
- ;;break;
- case _I_appicondropaction_:
- value = APIC_ActionDrop;
- ;;break;
- case _I_appiconname_:
- value = APIC_IconFile;
- ;;break;
- case _I_appicontitle_:
- value = APIC_IconTitle;
- ;;break;
- case _I_ascii_:
- value = ltostr((long)Current[Ep->column]);
- ;;break;
- case _I_autoindent_:
- value = GETF_AUTOINDENT (Ep)? "1": "0";
- ;;break;
- case _I_autosplit_:
- value = GETF_AUTOSPLIT (Ep)? "1": "0";
- ;;break;
- case _I_autounblock_:
- value = GETF_AUTOUNBLOCK (Ep)? "1": "0";
- ;;break;
- case _I_bbpen_:
- value = ltostr((long)BLOCK_BPEN(Ep));
- ;;break;
- case _I_bgpen_:
- value = ltostr((long)TEXT_BPEN(Ep));
- ;;break;
- case _I_block_:
- {
- Block block;
- get_block(&block);
- if (VSTK_Internal)
- sprintf (tmp_buffer, "%08lx %lx %08lx %08lx %08lx %08lx",
- (long)block.ep,
- (long)block.type,
- (long)block.start_line,
- (long)block.start_column,
- (long)block.end_line,
- (long)block.end_column);
- else
- sprintf (tmp_buffer, "%s %ld %ld %ld %ld %ld",
- (long)((struct Node *)block.ep)->ln_Name,
- (long)block.type,
- (long)block.start_line,
- (long)block.start_column,
- (long)block.end_line,
- (long)block.end_column);
- value = tmp_buffer;
- }
- ;;break;
- case _I_cmdshell_:
- value = GETF_CMDSH_ACTIVE (Ep)? "1": "0";
- ;;break;
- case _I_cmdshellname_:
- value = CMDSH_FileName;
- ;;break;
- case _I_cmdshellprompt_:
- value = CMDSH_Prompt;
- ;;break;
- case _I_colno_:
- value = ltostr((long)Ep->column + 1);
- ;;break;
- case _I_comlinemode_:
- value = GETF_COMLINEMODE (Ep)? "1": "0";
- ;;break;
- case _I_currentdir_:
- if (NameFromLock(Ep->dirlock, tmp_buffer, sizeof(tmp_buffer)))
- value = tmp_buffer;
-
- ;;break;
- case _I_currentline_:
- value = Current
- ;;break;
- case _I_currentword_:
- value = current_word()
- ;;break;
- case _I_debug_:
- value = GETF_DEBUG (Ep)? "1": "0";
- ;;break;
- case _I_dobackup_:
- value = GETF_DOBACK (Ep)? "1": "0";
- ;;break;
- case _I_ed_:
-
- if (VSTK_Internal)
- sprintf (value = tmp_buffer, "%08lx", Ep);
- else
- value = ((struct Node *)Ep)->ln_Name;
-
- ;;break;
- case _I_errorsoncmdshell_:
- value = CMDSH_ErrorsOut? "1": "0";
- ;;break;
- case _I_fgpen_:
- value = ltostr((long)TEXT_FPEN(Ep));
- ;;break;
- case _I_filename_:
- if (getpathto(Ep->dirlock, Ep->name, tmp_buffer))
- value = tmp_buffer;
-
- ;;break;
- case _I_findstr_:
- value = Fstr;
- ;;break;
- case _I_firstnb_:
- value = ltostr(firstns (Current) + 1);
- ;;break;
- case _I_fname_:
- value = Ep->name;
- ;;break;
- case _I_followcursor_:
- value = GETF_FOLLOWCURSOR (Ep)? "1": "0";
- ;;break;
- case _I_globalsearch_:
- value = GETF_GLOBALSEARCH (Ep)? "1": "0";
- ;;break;
- case _I_gtbformat_:
- value = GTB_Format;
- ;;break;
- case _I_hgpen_:
- value = ltostr((long)BLOCK_FPEN(Ep));
- ;;break;
- case _I_icon_:
-
- if (GETF_ICONMODE(Ep)) {
- array[0] = Ep->config.iwinx;
- array[1] = Ep->config.iwiny;
- } else {
- array[0] = Ep->win->LeftEdge;
- array[1] = Ep->win->TopEdge;
- } /* if */
- sprintf (tmp_buffer, "%ld %ld", array[0], array[1]);
- value = tmp_buffer;
-
- ;;break;
- case _I_iconactive_:
- value = GETF_ICONACTIVE (Ep)? "1": "0";
- ;;break;
- case _I_iconmode_:
- value = GETF_ICONMODE (Ep)? "1": "0";
- ;;break;
- case _I_icontitle_:
- value = icontitle_pattern;
- ;;break;
- case _I_ignorecase_:
- value = GETF_IGNORECASE (Ep)? "1": "0";
- ;;break;
- case _I_infixmode_:
- value = MathInfix? "1": "0";
- ;;break;
- case _I_insertmode_:
- value = GETF_INSERTMODE (Ep)? "1": "0";
- ;;break;
- case _I_itemcheck_:
- if (active_menu)
- value = (((struct MenuItem *)active_menu)->Flags & CHECKED) ? "1": "0";
-
- ;;break;
- case _I_keytable_:
-
- if ((value = (void*)currenthash()))
- value = ((struct Node *)value)->ln_Name;
-
- ;;break;
- case _I_lineno_:
- value = ltostr((long)Ep->line + 1);
- ;;break;
- case _I_margin_:
- value = ltostr((long)Ep->config.margin);
- ;;break;
- case _I_menufontname_:
- value = menufont_ta.ta_Name;
- ;;break;
- case _I_menufontsize_:
- value = ltostr((long)menufont_ta.ta_YSize);
- ;;break;
- case _I_menustrip_:
-
- if ((value = (void *)currentmenu()))
- value = ((struct Node *)value)->ln_Name;
-
- ;;break;
- case _I_modified_:
- value = GETF_MODIFIED (Ep)? "1": "0";
- ;;break;
- case _I_nicepaging_:
- value = GETF_NICEPAGING (Ep)? "1": "0";
- ;;break;
- case _I_norequest_:
- value = GETF_NOREQUEST (Ep)? "1": "0";
- ;;break;
- case _I_numlines_:
- value = ltostr((long)Ep->lines);
- ;;break;
- case _I_parcol_:
- value = ltostr((long)Ep->config.wwcol);
- ;;break;
- case _I_pens_:
-
- array[0] = TEXT_FPEN(Ep);
- array[1] = TEXT_BPEN(Ep);
- array[2] = BLOCK_FPEN(Ep);
- array[3] = BLOCK_BPEN(Ep);
- array[4] = TITLE_FPEN(Ep);
- array[5] = TITLE_BPEN(Ep);
-
- sprintf (tmp_buffer, "%ld %ld %ld %ld %ld %ld", array[0], array[1], array[2], array[3], array[4], array[5]);
- value = tmp_buffer;
-
- ;;break;
- case _I_pos_:
-
- if (VSTK_Internal)
- sprintf (tmp_buffer, "%08lx %08lx %08lx", (long)Ep, (long)Ep->line, (long)Ep->column);
- else
- sprintf (tmp_buffer, "%s %ld %ld", ((struct Node *)Ep)->ln_Name, (long)Ep->line, (long)Ep->column);
- value = tmp_buffer;
-
- ;;break;
- case _I_prevnbline_:
- {
- int i = Ep->line;
- while ((--i >= 0) && !GETTEXT(Ep,i)[0]);
- value = (i >= 0)? GETTEXT(Ep,i): "";
- }
- ;;break;
- case _I_recentword_:
- value = recent_word()
- ;;break;
- case _I_repstr_:
- value = Rstr;
- ;;break;
- case _I_reqpattern_:
- value = pattern;
- ;;break;
- case _I_reqresult_:
- value = ReqString;
- ;;break;
- case _I_restofline_:
- value = Current + Ep->column
- ;;break;
- case _I_rexxport_:
- value = RexxPortName;
- ;;break;
- case _I_rxresult_:
- value = get_rexx_result();
- ;;break;
- case _I_saveicons_:
- value = GETF_SAVEICONS (Ep)? "1": "0";
- ;;break;
- case _I_savetabs_:
- value = GETF_SAVETABS (Ep)? "1": "0";
- ;;break;
- case _I_scanf_:
- value = String;
- ;;break;
- case _I_shortlines_:
- value = GETF_SLINE (Ep)? "1": "0";
- ;;break;
- case _I_showtitle_:
- value = GETF_SHOWTITLE (Ep)? "1": "0";
- ;;break;
- case _I_simpletabs_:
- value = GETF_SIMPLETABS (Ep)? "1": "0";
- ;;break;
- case _I_sourcebreaks_:
- value = GETF_SOURCEBREAKS (Ep)? "1": "0";
- ;;break;
- case _I_tabstop_:
- value = ltostr((long)Ep->config.tabstop);
- ;;break;
- case _I_tbpen_:
- value = ltostr((long)TITLE_BPEN(Ep));
- ;;break;
- case _I_tfpen_:
- value = ltostr((long)TITLE_FPEN(Ep));
- ;;break;
- case _I_title_:
- value = title_pattern;
- ;;break;
- case _I_txtfontname_:
- value = (Ep->font? Ep->font->tf_Message.mn_Node.ln_Name: "*Defaultfont*");
- ;;break;
- case _I_txtfontsize_:
- value = ltostr((long)(Ep->font? Ep->font->tf_YSize: (Ysize - LineDistance)));
- ;;break;
- case _I_version_:
- value = version;
- ;;break;
- case _I_viewmode_:
- value = GETF_VIEWMODE (Ep)? "1": "0";
- ;;break;
- case _I_warningsoncmdshell_:
- value = CMDSH_WarningsOut? "1": "0";
- ;;break;
- case _I_window_:
-
- if (!GETF_ICONMODE(Ep)) {
- array[0] = Ep->config.winx;
- array[1] = Ep->config.winy;
- array[2] = Ep->config.winwidth;
- array[3] = Ep->config.winheight;
- } else {
- array[0] = Ep->win->LeftEdge;
- array[1] = Ep->win->TopEdge;
- array[2] = Ep->win->Width;
- array[3] = Ep->win->Height;
- } /* if */
-
- sprintf (tmp_buffer, "%d %d %d %d", array[0], array[1], array[2], array[3]);
- value = tmp_buffer;
-
- ;;break;
- case _I_windowcycling_:
- value = GETF_WINDOWCYCLING (Ep)? "1": "0";
- ;;break;
- case _I_windowtitles_:
- value = GETF_WINDOWTITLES (Ep)? "1": "0";
- ;;break;
- case _I_wordwrap_:
- value = GETF_WORDWRAP (Ep)? "1": "0";
- ;;break;
- default:
- return NULL;
- }
- return value;
- } /* spc_get */
-
- static int spc_set(long lock, char *value) {
- long array[6];
- char *av0_bak = av[0];
- char *av1_bak = av[1];
- char *av2_bak = av[2];
- switch (lock) {
- case _I_activetofront_:
- SETF_ACTIVATETOFRONT (Ep, test_arg (value, GETF_ACTIVATETOFRONT (Ep)));
- ;;break;
- case _I_appicon_:
-
- array[0] = test_arg(value, GETF_APIC_ACTIVE (Ep));
- if (array[0] != GETF_APIC_ACTIVE (Ep))
- if (array[0]) do_apicshow();
- else do_apichide();
- ;;break;
- case _I_appiconclickaction_:
- APIC_ActionDblClick = strrep (APIC_ActionDblClick, value);
- ;;break;
- case _I_appicondropaction_:
- APIC_ActionDrop = strrep (APIC_ActionDrop, value);
- ;;break;
- case _I_appiconname_:
- APIC_IconFile = strrep (APIC_IconFile, value);
- ;;break;
- case _I_appicontitle_:
- APIC_IconTitle = strrep (APIC_IconTitle, value);
- ;;break;
- case _I_autoindent_:
- SETF_AUTOINDENT (Ep, test_arg (value, GETF_AUTOINDENT (Ep)));
- ;;break;
- case _I_autosplit_:
- SETF_AUTOSPLIT (Ep, test_arg (value, GETF_AUTOSPLIT (Ep)));
- ;;break;
- case _I_autounblock_:
- SETF_AUTOUNBLOCK (Ep, test_arg (value, GETF_AUTOUNBLOCK (Ep)));
- ;;break;
- case _I_bbpen_:
- BLOCK_BPEN(Ep) = atol(value);
- ;;break;
- case _I_bgpen_:
- TEXT_BPEN(Ep) = atol(value);
- ;;break;
- case _I_block_:
- {
- Block block;
-
-
- if (VSTK_Internal)
- sscanf (value, "%08lx %lx %08lx %08lx %08lx %08lx", &array[0], &array[1], &array[2], &array[3], &array[4], &array[5]);
- else {
- sscanf (value, "%s %ld %ld %ld %ld %ld", tmp_buffer, &array[1], &array[2], &array[3], &array[4], &array[5]);
- array[0] = (long)finded (tmp_buffer, 0);
- } /* if */
-
- block.ep = (void *)array[0];
- block.type = array[1];
- block.start_line = array[2];
- block.start_column = array[3];
- block.end_line = array[4];
- block.end_column = array[5];
-
- /* /* **** MISSING SAFETY CHECK!!!! **** */
-
-
- set_block (&block);
-
- if (!GETF_ICONMODE(ActualBlock.ep))
-
-
-
-
- displayblock(1);
-
-
-
-
- }
- ;;break;
- case _I_cmdshell_:
-
- array[0] = test_arg(value, GETF_CMDSH_ACTIVE (Ep));
- if (array[0] != GETF_CMDSH_ACTIVE (Ep))
- if (array[0]) do_opencmdshell();
- else do_closecmdshell();
- ;;break;
- case _I_cmdshellname_:
- CMDSH_FileName = strrep (CMDSH_FileName, value);
- ;;break;
- case _I_cmdshellprompt_:
- CMDSH_Prompt = strrep (CMDSH_Prompt, value);
- ;;break;
- case _I_currentdir_:
-
- av[1] = value;
- do_cd();
- av[1] = av1_bak;
-
- ;;break;
- case _I_debug_:
- SETF_DEBUG (Ep, test_arg (value, GETF_DEBUG (Ep)));
- ;;break;
- case _I_dobackup_:
- SETF_DOBACK (Ep, test_arg (value, GETF_DOBACK (Ep)));
- ;;break;
- case _I_ed_:
-
- if (VSTK_Internal)
- sscanf (value, "%08lx", &array[0]);
- else {
- array[0] = (long)finded (value, 0);
- } /* if */
-
- /* /* **** MISSING SAFETY CHECK!!!! **** */
-
-
- switch_ed ((void *)array[0]);
-
-
- ActivateWindow (Ep->win);
- if (GETF_ACTIVATETOFRONT(Ep))
- WindowToFront(Ep->win);
-
-
-
-
-
-
-
- ;;break;
- case _I_errorsoncmdshell_:
- CMDSH_ErrorsOut = test_arg (value, CMDSH_ErrorsOut);
- ;;break;
- case _I_fgpen_:
- TEXT_FPEN(Ep) = atol(value);
- ;;break;
- case _I_filename_:
-
- av[1] = value;
- do_chfilename();
- av[1] = av1_bak;
-
- ;;break;
- case _I_findstr_:
- strcpy (Fstr, value);
- ;;break;
- case _I_fname_:
- strcpy (Ep->name, value);
- ;;break;
- case _I_followcursor_:
- SETF_FOLLOWCURSOR (Ep, test_arg (value, GETF_FOLLOWCURSOR (Ep)));
- ;;break;
- case _I_globalsearch_:
- SETF_GLOBALSEARCH (Ep, test_arg (value, GETF_GLOBALSEARCH (Ep)));
- ;;break;
- case _I_gtbformat_:
- GTB_Format = strrep (GTB_Format, value);
- ;;break;
- case _I_hgpen_:
- BLOCK_FPEN(Ep) = atol(value);
- ;;break;
- case _I_icon_:
-
- sscanf (value, "%ld %ld", &array[0], &array[1]);
-
- Ep->config.iwinx = array[0];
- Ep->config.iwiny = array[1];
-
- if (GETF_ICONMODE(Ep)) {
- MoveWindow (Ep->win, Ep->config.winx - Ep->win->LeftEdge,
- Ep->config.winy - Ep->win->TopEdge);
- } /* if */
-
- ;;break;
- case _I_iconactive_:
- SETF_ICONACTIVE (Ep, test_arg (value, GETF_ICONACTIVE (Ep)));
- ;;break;
- case _I_iconmode_:
-
- array[0] = test_arg(value, GETF_ICONMODE (Ep));
- if (array[0] != GETF_ICONMODE (Ep))
- if (array[0]) iconify ();
- else uniconify ();
- ;;break;
- case _I_icontitle_:
- strcpy (icontitle_pattern, value);
- ;;break;
- case _I_ignorecase_:
- SETF_IGNORECASE (Ep, test_arg (value, GETF_IGNORECASE (Ep)));
- ;;break;
- case _I_infixmode_:
- MathInfix = test_arg (value, MathInfix);
- ;;break;
- case _I_insertmode_:
- SETF_INSERTMODE (Ep, test_arg (value, GETF_INSERTMODE (Ep)));
- ;;break;
- case _I_keytable_:
-
- av[1] = value;
- do_use_keytable();
- av[1] = av1_bak;
-
- ;;break;
- case _I_margin_:
- Ep->config.margin = atol(value);
- ;;break;
- case _I_menufontname_:
-
- menufont_ta.ta_Name = strrep (menufont_ta.ta_Name, value);
- verify_menufont();
-
- ;;break;
- case _I_menufontsize_:
-
- menufont_ta.ta_YSize = atol(value);
- verify_menufont();
-
- ;;break;
- case _I_menustrip_:
-
- av[1] = value;
- do_use_menustrip();
- av[1] = av1_bak;
-
- ;;break;
- case _I_modified_:
- SETF_MODIFIED (Ep, test_arg (value, GETF_MODIFIED (Ep)));
- ;;break;
- case _I_nicepaging_:
- SETF_NICEPAGING (Ep, test_arg (value, GETF_NICEPAGING (Ep)));
- ;;break;
- case _I_norequest_:
- SETF_NOREQUEST (Ep, test_arg (value, GETF_NOREQUEST (Ep)));
- ;;break;
- case _I_parcol_:
- Ep->config.wwcol = atol(value);
- ;;break;
- case _I_pens_:
-
- sscanf (value, "%ld %ld %ld %ld %ld %ld", &array[0], &array[1], &array[2], &array[3], &array[4], &array[5]);
-
- TEXT_FPEN(Ep) = array[0];
- TEXT_BPEN(Ep) = array[1];
- BLOCK_FPEN(Ep) = array[2];
- BLOCK_BPEN(Ep) = array[3];
- TITLE_FPEN(Ep) = array[4];
- TITLE_BPEN(Ep) = array[5];
-
- if (!GETF_ICONMODE(Ep))
- text_redisplay ();
-
- SETF_MFORCETITLE(Ep,1);
-
- ;;break;
- case _I_pos_:
- {
- struct TextMarker pos;
- if (VSTK_Internal)
- sscanf (value, "%08lx %08lx %08lx", &array[0], &array[1], &array[2]);
- else {
- sscanf (value, "%s %ld %ld", tmp_buffer, &array[1], &array[2]);
- array[0] = (long)finded (tmp_buffer, 0);
- } /* if */
-
- pos.ep = (void*)array[0];
- pos.line = array[1];
- pos.column = array[2];
-
- /* /* **** MISSING SAFETY CHECK!!!! **** */
-
- text_sync ();
-
- text_cursor (1);
- switch_ed (pos.ep);
- text_cursor (0);
-
- if (IntuitionBase->ActiveWindow != Ep->win) {
- if (GETF_ACTIVATETOFRONT(Ep))
- WindowToFront (Ep->win);
- ActivateWindow (Ep->win);
- }
-
- if (pos.line >= Ep->lines)
- Ep->line = Ep->lines - 1;
- else
- Ep->line = pos.line;
-
- Ep->column = pos.column;
-
- text_load ();
- text_adjust (FALSE);
- }
- ;;break;
- case _I_repstr_:
- strcpy (Rstr, value);
- ;;break;
- case _I_reqpattern_:
- strcpy (pattern, value);
- ;;break;
- case _I_rxresult_:
- {
- av[1] = value;
- put_rexx_result();
- av[1] = av1_bak;
- }
- ;;break;
- case _I_saveicons_:
- SETF_SAVEICONS (Ep, test_arg (value, GETF_SAVEICONS (Ep)));
- ;;break;
- case _I_savetabs_:
- SETF_SAVETABS (Ep, test_arg (value, GETF_SAVETABS (Ep)));
- ;;break;
- case _I_scanf_:
- String = strrep (String, value);
- ;;break;
- case _I_shortlines_:
- SETF_SLINE (Ep, test_arg (value, GETF_SLINE (Ep)));
- ;;break;
- case _I_showtitle_:
- SETF_SHOWTITLE (Ep, test_arg (value, GETF_SHOWTITLE (Ep)));
- ;;break;
- case _I_simpletabs_:
- SETF_SIMPLETABS (Ep, test_arg (value, GETF_SIMPLETABS (Ep)));
- ;;break;
- case _I_sourcebreaks_:
- SETF_SOURCEBREAKS (Ep, test_arg (value, GETF_SOURCEBREAKS (Ep)));
- ;;break;
- case _I_tabstop_:
- Ep->config.tabstop = atol(value);
- ;;break;
- case _I_tbpen_:
- TITLE_BPEN(Ep) = atol(value);
- ;;break;
- case _I_tfpen_:
- TITLE_FPEN(Ep) = atol(value);
- ;;break;
- case _I_title_:
- strcpy (title_pattern, value);
- ;;break;
- case _I_viewmode_:
- SETF_VIEWMODE (Ep, test_arg (value, GETF_VIEWMODE (Ep)));
- ;;break;
- case _I_warningsoncmdshell_:
- CMDSH_WarningsOut = test_arg (value, CMDSH_WarningsOut);
- ;;break;
- case _I_window_:
-
- sscanf (value, "%ld %ld %ld %ld", &array[0], &array[1], &array[2], &array[3]);
-
- Ep->config.winx = array[0];
- Ep->config.winy = array[1];
- Ep->config.winwidth = array[2];
- Ep->config.winheight = array[3];
-
- if (!GETF_ICONMODE(Ep)) {
- MoveWindow (Ep->win, Ep->config.winx - Ep->win->LeftEdge,
- Ep->config.winy - Ep->win->TopEdge);
- SizeWindow (Ep->win, Ep->config.winwidth - Ep->win->Width,
- Ep->config.winheight - Ep->win->Height);
- } /* if */
-
- ;;break;
- case _I_windowcycling_:
- SETF_WINDOWCYCLING (Ep, test_arg (value, GETF_WINDOWCYCLING (Ep)));
- ;;break;
- case _I_windowtitles_:
- SETF_WINDOWTITLES (Ep, test_arg (value, GETF_WINDOWTITLES (Ep)));
- ;;break;
- case _I_wordwrap_:
- SETF_WORDWRAP (Ep, test_arg (value, GETF_WORDWRAP (Ep)));
- ;;break;
- default:
- return 0;
- }
- return 1;
- } /* spc_set */
-
- static int spc_say(long lock) {
- long array[6];
- switch (lock) {
- /* $ (@ITERATE@$ (@IF@?SAY@TRUE )) */
- case _I_activetofront_:
- warn("%s switched %s", spc_names[_I_activetofront_], GETF_ACTIVATETOFRONT (Ep)? __on: __off);
- ;;break;
- case _I_appicon_:
- warn("%s switched %s", spc_names[_I_appicon_], GETF_APIC_ACTIVE (Ep)? __on: __off);
- ;;break;
- case _I_appiconclickaction_:
- warn("%s set to %d", spc_names[_I_appiconclickaction_], APIC_ActionDblClick);
- ;;break;
- case _I_appicondropaction_:
- warn("%s set to %d", spc_names[_I_appicondropaction_], APIC_ActionDrop);
- ;;break;
- case _I_appiconname_:
- warn("%s set to %d", spc_names[_I_appiconname_], APIC_IconFile);
- ;;break;
- case _I_appicontitle_:
- warn("%s set to %d", spc_names[_I_appicontitle_], APIC_IconTitle);
- ;;break;
- case _I_ascii_:
- warn("%s set to %d", spc_names[_I_ascii_], Current[Ep->column]);
- ;;break;
- case _I_autoindent_:
- warn("%s switched %s", spc_names[_I_autoindent_], GETF_AUTOINDENT (Ep)? __on: __off);
- ;;break;
- case _I_autosplit_:
- warn("%s switched %s", spc_names[_I_autosplit_], GETF_AUTOSPLIT (Ep)? __on: __off);
- ;;break;
- case _I_autounblock_:
- warn("%s switched %s", spc_names[_I_autounblock_], GETF_AUTOUNBLOCK (Ep)? __on: __off);
- ;;break;
- case _I_bbpen_:
- warn("%s set to %d", spc_names[_I_bbpen_], BLOCK_BPEN(Ep));
- ;;break;
- case _I_bgpen_:
- warn("%s set to %d", spc_names[_I_bgpen_], TEXT_BPEN(Ep));
- ;;break;
- case _I_block_:
- return 0;
- ;;break;
- case _I_cmdshell_:
- warn("%s switched %s", spc_names[_I_cmdshell_], GETF_CMDSH_ACTIVE (Ep)? __on: __off);
- ;;break;
- case _I_cmdshellname_:
- warn("%s set to %d", spc_names[_I_cmdshellname_], CMDSH_FileName);
- ;;break;
- case _I_cmdshellprompt_:
- warn("%s set to %d", spc_names[_I_cmdshellprompt_], CMDSH_Prompt);
- ;;break;
- case _I_colno_:
- warn("%s set to %d", spc_names[_I_colno_], Ep->column + 1);
- ;;break;
- case _I_comlinemode_:
- warn("%s switched %s", spc_names[_I_comlinemode_], GETF_COMLINEMODE (Ep)? __on: __off);
- ;;break;
- case _I_currentdir_:
- return 0;
- ;;break;
- case _I_currentline_:
- return 0;
- ;;break;
- case _I_currentword_:
- return 0;
- ;;break;
- case _I_debug_:
- warn("%s switched %s", spc_names[_I_debug_], GETF_DEBUG (Ep)? __on: __off);
- ;;break;
- case _I_dobackup_:
- warn("%s switched %s", spc_names[_I_dobackup_], GETF_DOBACK (Ep)? __on: __off);
- ;;break;
- case _I_ed_:
- return 0;
- ;;break;
- case _I_errorsoncmdshell_:
- warn("%s switched %s", spc_names[_I_errorsoncmdshell_], CMDSH_ErrorsOut? __on: __off);
- ;;break;
- case _I_fgpen_:
- warn("%s set to %d", spc_names[_I_fgpen_], TEXT_FPEN(Ep));
- ;;break;
- case _I_filename_:
- return 0;
- ;;break;
- case _I_findstr_:
- warn("%s set to %s", spc_names[_I_findstr_], Fstr);
- ;;break;
- case _I_firstnb_:
- return 0;
- ;;break;
- case _I_fname_:
- warn("%s set to %s", spc_names[_I_fname_], Ep->name);
- ;;break;
- case _I_followcursor_:
- warn("%s switched %s", spc_names[_I_followcursor_], GETF_FOLLOWCURSOR (Ep)? __on: __off);
- ;;break;
- case _I_globalsearch_:
- warn("%s switched %s", spc_names[_I_globalsearch_], GETF_GLOBALSEARCH (Ep)? __on: __off);
- ;;break;
- case _I_gtbformat_:
- warn("%s set to %d", spc_names[_I_gtbformat_], GTB_Format);
- ;;break;
- case _I_hgpen_:
- warn("%s set to %d", spc_names[_I_hgpen_], BLOCK_FPEN(Ep));
- ;;break;
- case _I_icon_:
- return 0;
- ;;break;
- case _I_iconactive_:
- warn("%s switched %s", spc_names[_I_iconactive_], GETF_ICONACTIVE (Ep)? __on: __off);
- ;;break;
- case _I_iconmode_:
- warn("%s switched %s", spc_names[_I_iconmode_], GETF_ICONMODE (Ep)? __on: __off);
- ;;break;
- case _I_icontitle_:
- warn("%s set to %s", spc_names[_I_icontitle_], icontitle_pattern);
- ;;break;
- case _I_ignorecase_:
- warn("%s switched %s", spc_names[_I_ignorecase_], GETF_IGNORECASE (Ep)? __on: __off);
- ;;break;
- case _I_infixmode_:
- warn("%s switched %s", spc_names[_I_infixmode_], MathInfix? __on: __off);
- ;;break;
- case _I_insertmode_:
- warn("%s switched %s", spc_names[_I_insertmode_], GETF_INSERTMODE (Ep)? __on: __off);
- ;;break;
- case _I_itemcheck_:
- return 0;
- ;;break;
- case _I_keytable_:
- return 0;
- ;;break;
- case _I_lineno_:
- warn("%s set to %d", spc_names[_I_lineno_], Ep->line + 1);
- ;;break;
- case _I_margin_:
- warn("%s set to %d", spc_names[_I_margin_], Ep->config.margin);
- ;;break;
- case _I_menufontname_:
- warn("%s set to %d", spc_names[_I_menufontname_], menufont_ta.ta_Name);
- ;;break;
- case _I_menufontsize_:
- warn("%s set to %d", spc_names[_I_menufontsize_], menufont_ta.ta_YSize);
- ;;break;
- case _I_menustrip_:
- return 0;
- ;;break;
- case _I_modified_:
- warn("%s switched %s", spc_names[_I_modified_], GETF_MODIFIED (Ep)? __on: __off);
- ;;break;
- case _I_nicepaging_:
- warn("%s switched %s", spc_names[_I_nicepaging_], GETF_NICEPAGING (Ep)? __on: __off);
- ;;break;
- case _I_norequest_:
- warn("%s switched %s", spc_names[_I_norequest_], GETF_NOREQUEST (Ep)? __on: __off);
- ;;break;
- case _I_numlines_:
- warn("%s set to %d", spc_names[_I_numlines_], Ep->lines);
- ;;break;
- case _I_parcol_:
- warn("%s set to %d", spc_names[_I_parcol_], Ep->config.wwcol);
- ;;break;
- case _I_pens_:
- return 0;
- ;;break;
- case _I_pos_:
- return 0;
- ;;break;
- case _I_prevnbline_:
- return 0;
- ;;break;
- case _I_recentword_:
- return 0;
- ;;break;
- case _I_repstr_:
- warn("%s set to %s", spc_names[_I_repstr_], Rstr);
- ;;break;
- case _I_reqpattern_:
- warn("%s set to %s", spc_names[_I_reqpattern_], pattern);
- ;;break;
- case _I_reqresult_:
- warn("%s set to %s", spc_names[_I_reqresult_], ReqString);
- ;;break;
- case _I_restofline_:
- return 0;
- ;;break;
- case _I_rexxport_:
- warn("%s set to %s", spc_names[_I_rexxport_], RexxPortName);
- ;;break;
- case _I_rxresult_:
- return 0;
- ;;break;
- case _I_saveicons_:
- warn("%s switched %s", spc_names[_I_saveicons_], GETF_SAVEICONS (Ep)? __on: __off);
- ;;break;
- case _I_savetabs_:
- warn("%s switched %s", spc_names[_I_savetabs_], GETF_SAVETABS (Ep)? __on: __off);
- ;;break;
- case _I_scanf_:
- warn("%s set to %d", spc_names[_I_scanf_], String);
- ;;break;
- case _I_shortlines_:
- warn("%s switched %s", spc_names[_I_shortlines_], GETF_SLINE (Ep)? __on: __off);
- ;;break;
- case _I_showtitle_:
- warn("%s switched %s", spc_names[_I_showtitle_], GETF_SHOWTITLE (Ep)? __on: __off);
- ;;break;
- case _I_simpletabs_:
- warn("%s switched %s", spc_names[_I_simpletabs_], GETF_SIMPLETABS (Ep)? __on: __off);
- ;;break;
- case _I_sourcebreaks_:
- warn("%s switched %s", spc_names[_I_sourcebreaks_], GETF_SOURCEBREAKS (Ep)? __on: __off);
- ;;break;
- case _I_tabstop_:
- warn("%s set to %d", spc_names[_I_tabstop_], Ep->config.tabstop);
- ;;break;
- case _I_tbpen_:
- warn("%s set to %d", spc_names[_I_tbpen_], TITLE_BPEN(Ep));
- ;;break;
- case _I_tfpen_:
- warn("%s set to %d", spc_names[_I_tfpen_], TITLE_FPEN(Ep));
- ;;break;
- case _I_title_:
- warn("%s set to %s", spc_names[_I_title_], title_pattern);
- ;;break;
- case _I_txtfontname_:
- warn("%s set to %s", spc_names[_I_txtfontname_], (Ep->font? Ep->font->tf_Message.mn_Node.ln_Name: "*Defaultfont*"));
- ;;break;
- case _I_txtfontsize_:
- warn("%s set to %d", spc_names[_I_txtfontsize_], (Ep->font? Ep->font->tf_YSize: (Ysize - LineDistance)));
- ;;break;
- case _I_version_:
- warn("%s set to %s", spc_names[_I_version_], version);
- ;;break;
- case _I_viewmode_:
- warn("%s switched %s", spc_names[_I_viewmode_], GETF_VIEWMODE (Ep)? __on: __off);
- ;;break;
- case _I_warningsoncmdshell_:
- warn("%s switched %s", spc_names[_I_warningsoncmdshell_], CMDSH_WarningsOut? __on: __off);
- ;;break;
- case _I_window_:
- return 0;
- ;;break;
- case _I_windowcycling_:
- warn("%s switched %s", spc_names[_I_windowcycling_], GETF_WINDOWCYCLING (Ep)? __on: __off);
- ;;break;
- case _I_windowtitles_:
- warn("%s switched %s", spc_names[_I_windowtitles_], GETF_WINDOWTITLES (Ep)? __on: __off);
- ;;break;
- case _I_wordwrap_:
- warn("%s switched %s", spc_names[_I_wordwrap_], GETF_WORDWRAP (Ep)? __on: __off);
- ;;break;
- default:
- return 0;
- }
- return 1;
- } /* spc_say */
-
-
-
-
-